MyModalFilter
TheSGSettingsDialog
function causes the sequence grabber to present its settings dialog box to the user. This is a movable modal dialog box, so you must provide a filter function to handle update events in your window. You specify your filter function with theproc
parameter.A modal-dialog filter function whose address is passed to
SGSettingsDialog
should support the following interface:
pascal Boolean MyModalFilter (DialogPtr theDialog, EventRecord *theEvent, short *itemHit, long refCon);
theDialog
- Points to the settings dialog box's dialog structure.
theEvent
- Contains a pointer to an event structure. This event structure contains information identifying the nature of the event.
itemHit
- Contains a pointer to a field that contains the item selected by the user. If you handle the event, you should update this field to reflect the item number of the selected item.
refCon
- Contains a reference constant. You provide this reference constant to the sequence grabber in the
procRefNum
parameter of theSGSettingsDialog
function, which is described on page 5-45.DESCRIPTION
Your modal-dialog filter function returns a Boolean value that indicates whether you handled the event. Set this value totrue
if you handled the event; otherwise, set it tofalse
. If you handle the event, be sure to update the value of the field referred to by theitemHit
parameter.SEE ALSO
See Inside Macintosh: Files for a sample modal-dialog filter function.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help